package com.briup.cms.dao;

import com.briup.cms.bean.Inform;
import com.briup.cms.bean.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
/**
 * @program: User
 * @description:
 * @author: LiLong
 * @create: 2020-07-02
 **/
public interface UserMapper {
    @Select("select * from cms_user")
    List<User>  selectAll();
    @Insert("insert into cms_user values(null,#{usename},#{password},#{telephone},#{gender},#{realname},#{ptoto})")
    void insert(User comment);

    @Update("update cms_user set usename=#{usename},password=#{password},telephone=#{telephone},gender=#{gender},realname=#{realname},ptoto=#{ptoto} where id=#{id}")
    void update(User comment);

    @Delete("delete from cms_user where id = #{id}")
    void deleteById(long id);
}
